package utils

import (
	"log"
	"runtime/debug"
)

func SafeGo(fn func()) {
	go func() {
		defer func() {
			if r := recover(); r != nil {
				log.Println(r)
				debug.PrintStack()
			}
		}()
		fn()
	}()
}
